﻿/*
    Copyright (C) 2009 Shim Manning

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Shimpossible.Vonage
{

    /// <summary>
    /// Base class for Voice Mail
    /// </summary>
    abstract public class VoiceMail
    {
        int id;
        string from;
        DateTime date;
        TimeSpan length;

        public VoiceMail(int id, string from, DateTime date, TimeSpan len)
        {
            this.id = id;
            this.from = from;
            this.date = date;
            this.length = len;
        }

        /// <summary>
        /// Stream of voicemail
        /// This is probably a compress WAV file
        /// </summary>
        public abstract Stream Stream { get; }

        /// <summary>
        /// Voice mail number
        /// </summary>
        public int Id { get { return id; } }

        /// <summary>
        /// Phone number of caller
        /// </summary>
        public String From { get { return from; } }

        /// <summary>
        /// Date voicemail was left
        /// </summary>
        public DateTime Date { get { return date; } }

        /// <summary>
        /// Length of Voicemail
        /// </summary>
        public TimeSpan Length { get { return length; } }

    }
}
